readyFunc = function(){
    return {
        init: function(){
        	new MenuButton(2, '#menuDiv');
    	}
    };
}();

jQuery(readyFunc.init);

function save(tb) {
	$(addUserForm).form('submit',{
		url: __MANAGER+'user_add.do',
		success: function(data){
			var json = jQuery.parseJSON(data);
			if(json.rtnCode == 'success') {
				S4J.utils.showMessage(json.rtnMsg,parent);
				goback();
			}
		},
		onLoadSuccess: function(data) {
			alert(12);
		},
		onLoadError: function() {
			alert(32);
		},
		onBeforeLoad: function() {
			alert(43);
		}
	});
}

function personSnsDialog(t) {
	var snsDialogCfg = {
		columns: [{field:'personName',title:'姓名',width:100},
					{field:'personNo',title:'编号',width:100},
					{field:'company',title:'单位',width:100},
					{field:'mobile',title:'联系电话',width:100}],
		url: __MANAGER+'userQuery_personSnsDialog.do',
		queryField: 'personName',
		dbcFunc: dbcFunc	
	};
	function dbcFunc(data) {
		addUserForm.personName.value = data.personName;
		addUserForm.personId.value = data.personId;
	}
	S4J.utils.showSnsGridDialog(snsDialogCfg);
}

function goback(tb) {
	parent.closeWin();
}